export function timestampToTime(timestamp) {
    // const date = new Date(timestamp * 1000); // 将时间戳转为毫秒
    const date = new Date(timestamp);
    const year = date.getFullYear();
    const month = addZero(date.getMonth() + 1);
    const day = addZero(date.getDate());
    const hour = addZero(date.getHours());
    const minute = addZero(date.getMinutes());
    const second = addZero(date.getSeconds());
    return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
}

function addZero(num) {
    return num < 10 ? `0${num}` : num;
}